#include <iostream>
#include "Tcpserver.hpp"
#include "log.hpp"
#include <memory>


using namespace std;


void Useag(char* argv)
{
    cout<<"you should input like this:"<<argv<<" xxxx(port)"<<endl;
}


int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Useag(argv[0]);
        exit(USAGEERR0R);
    }

    uint16_t port=std::stoi(argv[1]);

    std::unique_ptr<Tcpserver> Tcp_svr(new Tcpserver(port));

    Tcp_svr->Init();
    Tcp_svr->run();

    return 0;
}